#ifndef DISCIDENTIFIER_H
#define DISCIDENTIFIER_H

#include <QObject>
#include <QDebug>
#include "logger.h"
#include <QFile>
#include <QCryptographicHash>
#include "dvdid.h"

class DiscIdentifier : public QObject
{
    Q_OBJECT
public:
    enum eMediaType
    {
        BLURAY,
        DVD,
        CD
    };
    enum eDVDIdentifyingStatus
    {
        IDENTIFIYING,
        WAITING_ANYDVD_DISABLED,
        WAITING_ANYDVD_ENABLED
    };
    typedef eDVDIdentifyingStatus DVDIdentifyingStatus;
    typedef eMediaType MediaType;
    explicit DiscIdentifier(QObject *parent = 0);
    DiscIdentifier(const QString drive,QObject *parent = 0);
    DiscIdentifier(const char * drive,QObject *parent = 0);

    MediaType getMediaType();
signals:
    void discIdentified(QByteArray  discId);
    void reloadDisc();
public slots:
    void identify();
    void identifyDVD();
    void identifyBLURAY();
    void identifyCD();
    void changeLetter(QString);

private:
    QString _newDriveLetter;
    QString _driveLetter;
    DVDIdentifyingStatus _dvdStatus;
    QByteArray _dvdid;

};

#endif // DISCIDENTIFIER_H
